package com.tsy.media;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.widget.Button;

import androidx.appcompat.app.AppCompatActivity;

import com.tsy.media.camera.CameraActivity;
import com.tsy.media.gallery.GalleryActivity;
import com.tsy.media.video.VideoActivity;
import com.yanzhenjie.album.Album;

public class MainActivity extends AppCompatActivity {

    private Button camera;

    private Button gallery;

    private Button video;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        camera = findViewById(R.id.btn_camera);
        gallery= findViewById(R.id.btn_gallery);
        video= findViewById(R.id.btn_video);
        camera.setOnClickListener(v->{
            startActivity(new Intent(this, CameraActivity.class));
        });
        gallery.setOnClickListener(v->{
            startActivity(new Intent(this, GalleryActivity.class));
        });
        video.setOnClickListener(v->{
            startActivity(new Intent(this, VideoActivity.class));
//            Album.image(this)//选择系统中的图片
////                    .video(this)//选择系统中的所有视频
////                    .album(this)//选择系统相册
//                    .singleChoice()//单选
//                    .camera(true)
//                    .columnCount(4)
//                    .onResult(result -> {//选择的结果
//                        Log.i("result",result.toString());
//                    }).onCancel(result -> {//选择取消的时候
//
//            }).start();
        });
    }
}